// 
//  Menu.m
//  XRmenu
//
//  Created by yangxh on 11-3-31.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import "Menu.h"

#import "Catalogs.h"
#import "XRmenuCoreData.h"
#import "singleton.h"

@implementation Menu 

@dynamic mCheckInTime;
@dynamic mMenuId;
@dynamic mStatus;
@dynamic mID;
@dynamic mDepartmentID;
@dynamic mProductsCount;
@dynamic mName;
@dynamic rsToCatalogs;

+ (NSArray *)allMenus
{
	NSArray *menus = [XRmenuCoreData searchObjectsInContext:@"Menu" Predicate:nil SortKey:nil SortAscending:NO];
	return menus;
}

- (void)setAsCurrentMenu
{
	DebugLog(@"%@",self.mMenuId);
	APPSESSION.currentBookID = self.mMenuId;
}

@end
